from smsactivate.api import SMSActivateAPI

if __name__ == '__main__':
    APIKEY = '5f5dde90f9edf1A97741b72A6c24deA5'
    api = SMSActivateAPI(APIKEY)
    # api.debug_mode = True  # Optional action. Required for debugging
    # 查询余额
    banance = api.getBalance()
    if float(banance.get("balance")) <= 100:
        print("没钱了")

    # num = api.getNumberV2(service="acz", maxPrice=11,  country="151")


    # # print(api.getNumber(service="acz", country="151"))
    # # num = api.getNumberV2(service="acz", maxPrice=11,  country="151")
    # # print(num.get("activationId"))
    # # print(num.get("activationCost"))
    # # print(num.get("phoneNumber"))
    # # print(api.getStatus(num.get("activationId")))
    # # print(api.getFullSms(num.get("activationId")))
    #
    # # 获取激活状态、
    # # STATUS_WAIT_CODE - 等待短信
    # #
    # # STATUS_WAIT_RETRY：“过去的、不匹配的代码” - 等待代码澄清
    # #
    # # STATUS_WAIT_RESEND - 等待重新发送短信*
    # #
    # # * 软件必须按重新发送短信并将状态更改为6
    # #
    # # STATUS_CANCEL - 激活已取消
    # #
    # # STATUS_OK：“激活码”-收到代码
    # print(api.getStatus("2204646254"))
    # # 获取验证码
    # print(api.getFullSms("2204646254"))
    #
    # api.setRentStatus(id="2204646254", status=2)